Python List count() example

36

colors = ['red', 'green', 'blue', 'orange','blue']
color_count = colors.count('blue')
print('The count of color: blue is ', color_count)

Comments

Submit
0 Comments